﻿namespace SERFLITEMAX20.WinUI.Controls
{
    using System;

    public class ListViewDoubleSort : ListViewTextSort
    {
        public ListViewDoubleSort(int sortColumn, bool ascending) : base(sortColumn, ascending)
        {
        }

        protected override int OnCompare(string lhs, string rhs)
        {
            double num = double.Parse(lhs) - double.Parse(rhs);
            if (num > 0.0)
            {
                return 1;
            }
            if (num < 0.0)
            {
                return -1;
            }
            return 0;
        }
    }
}

